/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28463
 * Date: 2022—05—13
 * Time: 8:05
 */

/*
public class Person{

    private String name = "Person";

    int age=0;

}


public class Child extends Person{

    public String grade;

    public static void main(String[] args){

        Person p = new Child();

        System.out.println(p.name);

    }

}*/

/*
class Base {

    Base() {

        System.out.print("Base");

    }

}

public class TestDemo01 extends Base {

    public static void main( String[] args ) {

        new TestDemo01();

        //调用父类无参的构造方法

        new Base();

    }

}*/
/*
class Base{

    public Base(String s){

        System.out.print("B");

    }

}

public class TestDemo01 extends Base {

    public TestDemo01(String s) {
        super();

        System.out.print("D");

    }

    public static void main(String[] args) {

        new TestDemo01("C");

    }
}
*/
/*
class X{
    Y y=new Y();
    public X(){
        System.out.print("X");
    }
}
class Y{
    public Y(){
        System.out.print("Y");
    }
}
public class TestDemo01 extends X{
    Y y=new Y();
    public TestDemo01(){
        System.out.print("Z");
    }
    public static void main(String[] args) {
        new TestDemo01();
    }
}
*/
/*//实例化一个对象
public class Date{
        public int year;
        public int month;
        public int day;

        public void setDay(int year, int month, int day){
            this.year = year;
            this.month = month;
            this.day = day;
        }

        public void printDat(){
            System.out.println(this.year + "/" +this.month + "/" + this.day);
        }

    public static void main(String[] args) {
        Date d= new Date();
        d.setDay(2022,5,13);
        d.printDat();
    }
}*/

